home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d889.lha / SCSIUtil / scsi_priv.h < prev    next >
Text File  |  1993-07-16  |  3KB  |  130 lines

  1. /*
  2.  *    scsi_priv.h
  3.  */
  4.  
  5. #define BYTES_PER_LINE    16
  6. #define SENSE_LEN 252
  7. #define MAX_DATA_LEN 252
  8. #define MAX_TOC_LEN 804        /* max TOC size = 100 TOC track descriptors */
  9. #define PAD 0
  10. #define    LINE_BUF    (128)
  11. #define NUM_OF_CDDAFRAMES 75    /* 75 frames per second audio */
  12. #define CDDALEN 2352        /* 1 frame has 2352 bytes */
  13. #define MAX_CDDALEN CDDALEN * NUM_OF_CDDAFRAMES
  14.  
  15. #define OFFS_KEY 2
  16. #define OFFS_CODE 12
  17.  
  18. #define NDBLBUF 4
  19.  
  20. /*
  21.  * we open ( if no -d option) the first *scsi*.device in the device list.
  22.  */
  23. #define SCSI_STRING "scsi"
  24.  
  25. typedef struct MsgPort MSGPORT;
  26. typedef struct IOStdReq IOSTDREQ;
  27. typedef struct List LIST;
  28. typedef struct Node NODE;
  29. typedef struct SCSICmd SCSICMD;
  30.  
  31. typedef struct
  32.  {
  33.    BYTE   code;
  34.    UBYTE  *ptr;
  35.  } IDTOSTRING;
  36.  
  37.  
  38. #undef  FALSE
  39. #undef TRUE
  40. typedef enum
  41. {
  42.   FALSE = 0, TRUE
  43. } BOOLEAN;
  44.  
  45. /* type used for a 6 byte SCSI command */
  46. typedef struct
  47.  {
  48.    UBYTE  opcode;
  49.    UBYTE  b1;
  50.    UBYTE  b2;
  51.    UBYTE  b3;
  52.    UBYTE  b4;
  53.    UBYTE  control;
  54.  } SCSICMD6;
  55.  
  56. /* type used for a 10 byte SCSI command */
  57. typedef struct
  58.  {
  59.    UBYTE  opcode;
  60.    UBYTE  b1;
  61.    UBYTE  b2;
  62.    UBYTE  b3;
  63.    UBYTE  b4;
  64.    UBYTE  b5;
  65.    UBYTE  b6;
  66.    UBYTE  b7;
  67.    UBYTE  b8;
  68.    UBYTE  control;
  69.  } SCSICMD10;
  70.  
  71. /* type used for a 12 byte SCSI command */
  72. typedef struct
  73.  {
  74.    UBYTE  opcode;
  75.    UBYTE  b1;
  76.    UBYTE  b2;
  77.    UBYTE  b3;
  78.    UBYTE  b4;
  79.    UBYTE  b5;
  80.    UBYTE  b6;
  81.    UBYTE  b7;
  82.    UBYTE  b8;
  83.    UBYTE  b9;
  84.    UBYTE  b10;
  85.    UBYTE  control;
  86.  } SCSICMD12;
  87.  
  88.  
  89. /* SCSI commands */
  90.  
  91. #define    SCSI_CMD_TUR    0x00    /* Test Unit Ready    */
  92. #define    SCSI_CMD_RZU    0x01    /* Rezero Unit        */
  93. #define    SCSI_CMD_RQS    0x03    /* Request Sense    */
  94. #define    SCSI_CMD_FMU    0x04    /* Format unit        */
  95. #define    SCSI_CMD_RAB    0x07    /* Reassign Block    */
  96. #define    SCSI_CMD_RD    0x08    /* Read            */
  97. #define    SCSI_CMD_WR    0x0A    /* Write        */
  98. #define    SCSI_CMD_SK    0x0B    /* Seek            */
  99. #define    SCSI_CMD_INQ    0x12    /*  6B: Inquiry        */
  100. #define    SCSI_CMD_MSL    0x15    /* Mode Select        */
  101. #define    SCSI_CMD_RU    0x16    /* Reserve Unit        */
  102. #define    SCSI_CMD_RLU    0x17    /* Release Unit        */
  103. #define    SCSI_CMD_MSE    0x1A    /*  6B: Mode Sense    */
  104. #define    SCSI_CMD_SSU    0x1B    /*  6B: Start/Stop Unit    */
  105. #define    SCSI_CMD_RDI    0x1C    /* Receive Diagnostic    */
  106. #define    SCSI_CMD_SDI    0x1D    /* Send Diagnostic    */
  107. #define    SCSI_CMD_RCP    0x25    /* Read Capacity    */
  108. #define    SCSI_CMD_RXT    0x28    /* Read Extended    */
  109. #define    SCSI_CMD_WXT    0x2A    /* Write Extended    */
  110. #define    SCSI_CMD_SKX    0x2B    /* Seek Extended    */
  111. #define    SCSI_CMD_WVF    0x2E    /* Write & Verify    */
  112. #define    SCSI_CMD_VF    0x2F    /* Verify        */
  113. #define    SCSI_CMD_RDD    0x37    /* Read Defect Data    */
  114. #define    SCSI_CMD_WDB    0x3B    /* Write Data Buffer    */
  115. #define    SCSI_CMD_RDB    0x3C    /* Read Data Buffer    */
  116.  
  117. #define SCSI_CMD_COPY        0x18    /*  6B: Copy */
  118. #define SCSI_CMD_COMPARE    0x39    /* 10B: Compare */
  119. #define SCSI_CMD_COPYANDVERIFY    0x3A    /* 10B: Copy and Verify */
  120. #define SCSI_CMD_CHGEDEF    0x40    /* 10B: Change Definition */
  121. #define SCSI_CMD_READSUBCHANNEL    0x42    /* 10B: Read Sub-Channel */
  122. #define SCSI_CMD_READTOC    0x43    /* Read TOC from CD Audio */
  123. #define SCSI_CMD_READHEADER    0x44    /* 10B: Read data block address header */
  124. #define SCSI_CMD_PLAYAUDIO10    0x45    /* Play CD Audio */
  125. #define SCSI_CMD_PLAYAUDIOTRACKINDEX    0x48    /* Play CD Audio Track */
  126.  
  127. /* Sony CDU 561 / Sony CDU 8003 = Apple CD 300 specific commands */
  128. #define SCSI_CMD_READCDDA    0xD8    /* 12B: read digital audio */
  129. #define SCSI_CMD_READCDDAMSF    0xD9    /* 12B: read digital audio */
  130.